package day5;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Div2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入a和b两个整数：");
        try {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = a / b;//b =0
            System.out.println("商是" + c);
        } catch (InputMismatchException e) {
            System.out.println("出现错误了：" + e);
            e.printStackTrace();
        } finally {
            System.out.println("计算完成了");//一定执行
        }


    }
}
